one of the things that occupy much of my time (besides women) is music. i don't mean listening to my favourite musicians. i mean (computer aided) music synthesis.
the reason that i'm mentioning all these is to talk about my (almost) exclusive synthesis tool. It's free (as free speech) and many people refer to it as a programming language more than a tool.
so csound (written in c) is the compiler and csd is the source file. every csd file has 3 parts: * options: command line options for the compilation * orchestra: the track structure (instruments) * score: the way (duration & other attributes) instruments are played
i'll be back with more info about all these in future posts. For now just enjoy a small track of electronic music by luis maurette.
the track contains three instruments:
instr 106 ; NOISE
idur = p3
iamp = ampdb(p4)
ifrq = cpspch(p5)
iatk = p6
irel = p7
iflut1 = p8
iflut2 = p9
iharm = p10
kenv linen iamp,iatk, idur, irel
asig1 buzz iamp, ifrq, iharm, 2
kenv2 line iflut1, p3, iflut2
ktick oscil 50, kenv2*.1, 1
alfo oscil 10, 1*ktick, 1
afil tone asig1, 1000*alfo
out afil
endin
instr 206 ; NOISE
idur = p3
iamp = ampdb(p4)
iamp2 = ampdb(p5)
ifrq1 = cpspch(p6)
ifrq2 = cpspch(p7)
iatk = p8
irel = p9
iflut1 = p10
iflut2 = p11
iharm = p12
kfrenv line ifrq1, idur, ifrq2
kamp line iamp, idur, iamp2
kenv linen kamp,iatk, idur, irel
asig1 buzz kamp, kfrenv, iharm, 2
kenv2 line iflut1, p3, iflut2
ktick oscil 50, kenv2*.1, 1
alfo oscil 10, 1*ktick, 1
afil tone asig1, 1000*alfo
out afil
endin
instr 108 ; FM
idur = p3
iamp = ampdb(p4)
ifrq = cpspch(p5)
ifun = p6
iatk = p7
irel = p8
icar = p9
imod = p10
index = p11
irep = p12
kenv linseg 0, iatk, 1, irel, 0
kenv2 oscil iamp, 1/idur*irep, ifun
asig1 foscil kenv, ifrq, icar, imod, index, ifun
out asig1*kenv2
endin
if you don't believe me... compile it :)
you can also find a vim syntax highlighting package for vim. is this open source music or what?